(function(win){
	var Nuui = win.Nuui = win.Nuui || {};
	/**
	 * @memberof Nuui
	 * @desc 版本文件加载器<br/>
	 * 		一般用于加载版本文件nuui-version.js<br/>
	 * 		加载文件时会添加时间戳,保持文件一直更新,防止读到缓存
	 */

	

	Nuui.vloader = {
		/**
		 * @memberof Nuui.vloader
		 * @desc 读取对应的js文件,且增加时间戳
		 * @func load
		 * @static
		 * @param {obj} js - script标签的属性键值对<br/>
		 * 						默认键值对有:
		 * 						type="text/javascript"<br/>
		 * 						charset="utf-8"
		 * @example Nuui.vloader.load({"src":"./nuui/nuui-version.js"});
		 * <script src="./nuui/nuui-version.js?20151026" type="text/javascript" charset="utf-8"></script>
		 */
		load:function(js){
			js.type = js.type || "text/javascript";
			js.charset = js.charset || "utf-8";
			var script = ["<script"];
			for(key in js){
				var value = js[key];
				if(key == "src"){
					value = value + ((value.indexOf("?") === -1 ? "?" : "&") + this._getTimestamp());
				}
				script.push(" " + key + "=\"" + value + "\"");
			}
			script.push("></script>");
			document.write(script.join(""));
		},
		
		_getTimestamp:function(){
			return new Date().getTime();
		}
	};
})(window);